package com.sskj.mine.asset;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.presenter.BasePresenter;


/**
 * @author Hey
 * Create at  2019/05/04
 */
class AddAddressPresenter extends BasePresenter<AddAddressActivity> {


    /**
     * 提币地址添加删除
     *
     * @param address 钱包地址
     * @param notes 备注
     * @param type 1btc(usdt) 2eth
     * @return
     */
    public void addAddress(String address,String notes,String type){
        httpService.addAddress(address,notes,type).execute(new JsonCallBack<HttpData>(this) {
            @Override
            public void onSuccess(Response<HttpData> response) {
               HttpData httpData = response.body();
               if (httpData.getStatus() == HttpConfig.OK) {

                   mView.addSuccess();
               }
            }
        });
    }
}
